#pragma once
#include <iostream>

using namespace std;


class Date
{

	friend ostream& operator<<(ostream& out, const Date& x);
	friend istream& operator>>(istream& in, Date& x);
	int _year;
	int _month;
	int _day;
public:

	Date(int year = 1, int month = 1, int day = 1);


	bool operator==(const Date& x)const;
	bool operator>(const Date& x)const;
	bool operator>=(const Date& x)const;
	bool operator<(const Date& x)const;
	bool operator<=(const Date& x)const;
	bool operator!=(const Date& x)const;


	static int MonthDay(int year, int month);

	
	Date operator+(int day)const;
	Date& operator+=(int day);
	Date operator-(int day)const;
	int operator-(const Date& x)const;
	Date& operator-=(int day);
	Date& operator++();
	Date operator++(int);
	
	
	
};

ostream& operator<<(ostream& out,const Date& x);
istream& operator>>(istream& in, Date& x);